package com.hr.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hr.system.mapper.SysAllowanceMapper;
import com.hr.system.domain.SysAllowance;
import com.hr.system.service.ISysAllowanceService;
import com.hr.common.core.text.Convert;

/**
 * 员工薪资应发项目Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-04-29
 */
@Service
public class SysAllowanceServiceImpl implements ISysAllowanceService 
{
    @Autowired
    private SysAllowanceMapper sysAllowanceMapper;

    /**
     * 查询员工薪资应发项目
     * 
     * @param id 员工薪资应发项目ID
     * @return 员工薪资应发项目
     */
    @Override
    public SysAllowance selectSysAllowanceById(Long id)
    {
        return sysAllowanceMapper.selectSysAllowanceById(id);
    }

    /**
     * 查询员工薪资应发项目列表
     * 
     * @param sysAllowance 员工薪资应发项目
     * @return 员工薪资应发项目
     */
    @Override
    public List<SysAllowance> selectSysAllowanceList(SysAllowance sysAllowance)
    {
        return sysAllowanceMapper.selectSysAllowanceList(sysAllowance);
    }

    /**
     * 新增员工薪资应发项目
     * 
     * @param sysAllowance 员工薪资应发项目
     * @return 结果
     */
    @Override
    public int insertSysAllowance(SysAllowance sysAllowance)
    {
        return sysAllowanceMapper.insertSysAllowance(sysAllowance);
    }

    /**
     * 修改员工薪资应发项目
     * 
     * @param sysAllowance 员工薪资应发项目
     * @return 结果
     */
    @Override
    public int updateSysAllowance(SysAllowance sysAllowance)
    {
        return sysAllowanceMapper.updateSysAllowance(sysAllowance);
    }

    /**
     * 删除员工薪资应发项目对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysAllowanceByIds(String ids)
    {
        return sysAllowanceMapper.deleteSysAllowanceByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除员工薪资应发项目信息
     * 
     * @param id 员工薪资应发项目ID
     * @return 结果
     */
    @Override
    public int deleteSysAllowanceById(Long id)
    {
        return sysAllowanceMapper.deleteSysAllowanceById(id);
    }
}
